package c.e.a.b.e.c;

import android.util.Log;

/* compiled from: com.google.android.gms:play-services-measurement-impl@@18.0.0 */
public final class p2 extends l2<Boolean> {
    public p2(q2 q2Var, String str, Boolean bool) {
        super(q2Var, str, bool, true, null);
    }

    public final /* synthetic */ Object a(Object obj) {
        if (obj instanceof Boolean) {
            return (Boolean) obj;
        }
        String str;
        if (obj instanceof String) {
            str = (String) obj;
            if (u1.c.matcher(str).matches()) {
                return Boolean.TRUE;
            }
            if (u1.d.matcher(str).matches()) {
                return Boolean.FALSE;
            }
        }
        str = c();
        String valueOf = String.valueOf(obj);
        StringBuilder stringBuilder = new StringBuilder(valueOf.length() + (String.valueOf(str).length() + 28));
        stringBuilder.append("Invalid boolean value for ");
        stringBuilder.append(str);
        stringBuilder.append(": ");
        stringBuilder.append(valueOf);
        Log.e("PhenotypeFlag", stringBuilder.toString());
        return null;
    }
}
